package com.example.rssfeed;


import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;

import com.example.rssfeed.MyListFragment.OnItemSelectedListener;
public class FeedActivity extends Activity implements  OnItemSelectedListener{

	DetailFragment fragment;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_feed);
		fragment=(DetailFragment) getFragmentManager().findFragmentById(R.id.detailFragment);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.feed, menu);
		return true;
	}

	@Override
	public void onRssItemSelected(String link) {
		// TODO Auto-generated method stub
		if(fragment!=null && fragment.isInLayout()){
			fragment.setText(link);
		}
	}

}
